<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/common/public.jsp" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<script type="text/javascript" src="${ctx}/js/checkFrom.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编辑销售计划</title>
	<script type="text/javascript">
		$(document).ready(function(){
			var   tt   =   1;
			$("#selectUser").click(function(){
						tt   =   tt?0:1;
						if(tt){
							var userId=$("#selectUser").find("option:selected").val();
							var userName=$("#selectUser").find("option:selected").text();
							$("#approverId").val(userId);
							$("#approver").val(userName);
						}
					}
			);

		});

	</script>
</head>
<body>
<a href="${ctx}/index.jsp">返回主页</a>
<a href="${ctx}/salePlan/list">返回销售计划列表</a>
<hr />
<form action="${ctx }/salePlan/update" method="post">
<input type="hidden" name="salePlanId" value="${salePlan.salePlanId}">
<table>
	<tr>
		<td>计划开始时间</td>
		<td><input type="text" name="startTime" id="calendar" readonly value="${salePlan.startTime}"/></td>
	</tr>
	<tr>
		<td>计划结束时间</td>
		<td><input type="text" name="endTime" id="date-input" readonly value="${salePlan.endTime}"></td>
	</tr>
	<tr>
		<td>审批人</td>
		<input type="hidden" name="approverId" id="approverId" value="${salePlan.approverId}">
		<td><input type="text" name="approver" id="approver" readonly value="${salePlan.approver}"></td>
		<td>
			<select id="selectUser">
				<c:forEach items="${userList }" var="user">
					<option value="${user.id}">${user.username}</option>
				</c:forEach>
			</select>
		</td>
	</tr>
	<tr>
		<td>备注</td>
		<td><input type="text" name="remarks" id="remarks" value="${salePlan.remarks}"/></td>
	</tr>
<tr>
	<td></td>
	<td><input type="submit" value="保存">  </td>
</tr>
</table>
</form>
</body>
</html>